<template>
    <div>
    <Select :label-in-value="true" @on-change="changeSelect" style="width:100px">
        <Option v-for="item in handlerGroupOptionList"  :value="item.skillId"  :key="item.skillId">{{ item.skillName }}</Option>
    </Select>
    </div>
</template>
<script>
    import configService from 'service/configService.js'
    export default {
        name: 'handlerGroup',
        data() {
            return {
                handlerGroupOptionList: []
            }
        },
        created() {
            this.getHandlerGroupList()
        },
        methods: {
            async getHandlerGroupList() {
                let skillData = []
                let jsondata = await configService.getInitHandlerGroup()
                skillData.push(jsondata)
                this.handlerGroupOptionList = skillData
            },
            changeSelect(currentOption) {
                // console.log(currentOption)
                //{value: "2", label: "开发"}
                //{value: "ff8080815ebe05ab015ec138864f0000", label: "专车"}
                //  this.nextHandlerGroupName = currentOption.label
                this.$emit('getHandlerGroupData', currentOption)
            }
        }
    }
</script>